package com.mingqijia.gassafety.authority.api.web.facade;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;

/**
 * 权限管理接口
 * @author Damon S.
 * @version v1.0.1
 * @date 2020年05月27日 22:45
 */
@Api(tags = "控制台--工具")
@RequestMapping(value = "/console/v1/common", produces = MediaType.APPLICATION_JSON_VALUE)
public interface CommonManageFacade {

    @PostMapping("/file")
    @ApiOperation(value = "上传文件", notes = "返回用户权限")
    String uploadFile(@RequestParam("file")MultipartFile file);

    @PostMapping("/image")
    @ApiOperation(value = "上传图片", notes = "返回用户权限")
    String uploadImage(@RequestParam("file")MultipartFile file);

    @GetMapping("/file/{fileName}")
    @ApiOperation(value = "下载文件", notes = "返回用户权限")
    void downloadFile(@PathVariable String fileName, HttpServletResponse response);
}
